Skip to content

Commit

Permalink
[2023.1] Blend-Charm 2023.1 release~
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackStartx committed Apr 6, 2023
1 parent a744bd0 commit d952fcd
Show file tree
Hide file tree
Showing 19 changed files with 76 additions and 32 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,25 @@ so, sadly, that feature can't work on Community Edition.

# Knew Issues

### Debug shows an external file instead of the local one.
### ~~Debug shows an external file instead of the local one.~~

Sadly this issue has been reported on YouTrack multiple times, I think we
shall wait a fix from IntelliJ Team.
> This *should* have been fixed from 2023.1 onwards but it's using a "workaround".
>
~~Sadly this issue has been reported on YouTrack multiple times, I think we
shall wait a fix from IntelliJ Team.~~

- https://youtrack.jetbrains.com/issue/PY-34001
- https://youtrack.jetbrains.com/issue/PY-18491
- ~~https://youtrack.jetbrains.com/issue/PY-34001~~
- ~~https://youtrack.jetbrains.com/issue/PY-18491~~

### Run configuration console not printing.

By running Blender normally trough the plugin, the console is a little shy to print output buffers.

###### This issue is not present in Debug mode.

### Debug configuration crash.

If you are running in debug mode, and an exception is thrown by the code,
If you are running in debug mode, and an exception is thrown by the code,
Blender will crash.

# Credits
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
plugins {
id 'java'
id 'org.jetbrains.intellij' version '1.10.0'
id 'org.jetbrains.intellij' version '1.13.3'
}

group 'org.blackstartx'
version '2022.3'
version '2023.1'

sourceCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17

repositories {
mavenCentral()
Expand All @@ -20,7 +20,7 @@ dependencies {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
plugins = ["python"]
version = "PY-2022.3"
version = "PY-2023.1"
type = 'PY'
}
patchPluginXml {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Fri May 08 20:56:34 CEST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/icons/BlendCharmIcons.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.swing.*;

public interface BlendCharmIcons {
Icon BLENDER_LOGO = IconLoader.findIcon("/icons/blender_logo_gray.png", BlendCharmIcons.class);
Icon BLENDER_FOLDER_ICON = IconLoader.findIcon("/icons/addon_folder.png", BlendCharmIcons.class);
Icon BLENDER_SRC_FOLDER_ICON = IconLoader.findIcon("/icons/addon_src_folder.png", BlendCharmIcons.class);
Icon BLENDER_LOGO = IconLoader.findIcon("/icons/blender_logo_gray.svg", BlendCharmIcons.class);
Icon BLENDER_FOLDER_ICON = IconLoader.findIcon("/icons/addon_folder.svg", BlendCharmIcons.class);
Icon BLENDER_SRC_FOLDER_ICON = IconLoader.findIcon("/icons/addon_src_folder.svg", BlendCharmIcons.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<icon value="nodes/folder.png"/>
<text value=""/>
</properties>
</component>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ui.dialogs.add_blender_instance;

import com.intellij.icons.AllIcons;
import data.BlenderExeFileChooserDescriptor;
import data.BlenderInstance;
import util.MySwingUtil;
Expand All @@ -20,9 +21,14 @@ public class AddBlenderInstance extends JDialog {

AddBlenderInstance(@NotNull Project project) {
setContentPane(contentPane);
initIcons();
MySwingUtil.setLabelOnClickListener(explore, () -> onExploreClick(project));
}

private void initIcons() {
this.explore.setIcon(AllIcons.Nodes.Folder);
}

private void onExploreClick(@NotNull Project project) {
FileChooserDescriptor descriptor = new BlenderExeFileChooserDescriptor();
descriptor.setTitle("Blender Runnable.");
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/ui/tool_window/BlenderToolWindow.form
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<icon value="general/add.png"/>
<text value=""/>
</properties>
</component>
Expand All @@ -44,7 +43,6 @@
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<icon value="general/remove.png"/>
<text value=""/>
</properties>
</component>
Expand All @@ -54,7 +52,6 @@
</constraints>
<properties>
<enabled value="true"/>
<icon value="actions/execute.png"/>
<text value=""/>
</properties>
</component>
Expand All @@ -63,7 +60,6 @@
<grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<icon value="actions/startDebugger.png"/>
<text value=""/>
</properties>
</component>
Expand Down
26 changes: 18 additions & 8 deletions src/main/java/ui/tool_window/BlenderToolWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.intellij.execution.*;
import com.intellij.execution.ui.ConsoleViewContentType;
import com.intellij.execution.ui.RunContentDescriptor;
import com.intellij.icons.AllIcons;
import data.*;
import org.json.JSONArray;
import org.json.JSONObject;
Expand Down Expand Up @@ -76,6 +77,7 @@ public class BlenderToolWindow {
BlenderToolWindow(@NotNull Project project) {
this.project = new MyProjectHolder(project);
this.blenderSettings = BlenderSettings.getBlenderSettings(this.project);
initIcons();
init();

for (BlenderInstance savedBlenderInstance : blenderSettings.getBlenderInstances())
Expand All @@ -97,12 +99,11 @@ public class BlenderToolWindow {
runningInstances.addListSelectionListener(e -> setConsoleView(getSelectedRunningProcess()));
}

private RunningBlenderProcess getSelectedRunningProcess() {
return runningInstances.getSelectedIndex() == -1 ? null : runningInstancesAdapter.get(runningInstances.getSelectedIndex());
}

private boolean isSelectedInstanceValid() {
return blenderInstances.getModel().getSize() != 0;
private void initIcons() {
start.setIcon(AllIcons.Actions.Execute);
button_add.setIcon(AllIcons.General.Add);
debug.setIcon(AllIcons.Actions.StartDebugger);
button_remove.setIcon(AllIcons.General.Remove);
}

private void init() {
Expand All @@ -115,6 +116,14 @@ public void after(@NotNull List<? extends VFileEvent> events) {
});
}

private RunningBlenderProcess getSelectedRunningProcess() {
return runningInstances.getSelectedIndex() == -1 ? null : runningInstancesAdapter.get(runningInstances.getSelectedIndex());
}

private boolean isSelectedInstanceValid() {
return blenderInstances.getModel().getSize() != 0;
}

private void onSave(VirtualFile virtualFile) {
for (int i = 0; i < runningInstancesAdapter.size(); i++)
intellijConsoleInfoPrintLn(runningInstancesAdapter.get(i).getConsole(), "[On Save: VFS_CHANGE]");
Expand Down Expand Up @@ -224,7 +233,8 @@ private void onInstanceMessage(MySocketConnection.Data message, RunningBlenderPr
if (runningBlenderProcess.isDebug()) intentionalDebugRestart(runningBlenderProcess);
}
}
case CommunicationData.RESPONSE_PLUGIN_REFRESH -> root.getString(CommunicationData.RESPONSE_PLUGIN_REFRESH_STATUS);
case CommunicationData.RESPONSE_PLUGIN_REFRESH ->
root.getString(CommunicationData.RESPONSE_PLUGIN_REFRESH_STATUS);
}
}

Expand Down Expand Up @@ -385,7 +395,7 @@ private void onDebugClick() {
configuration.setSuspendAfterConnect(false);

configuration.setMappingSettings(new PathMappingSettings() {{
add(new PathMapping(project.addonContainerPath(), getSelectedBlenderInstance().addonPath));
add(new PathMapping(project.addonContainerPath().toLowerCase(), getSelectedBlenderInstance().addonPath.toLowerCase()));
}});

Executor debugExecutorInstance = DefaultDebugExecutor.getDebugExecutorInstance();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<id>org.blackstartx.blend-charm</id>
<name>Blend-Charm</name>
<vendor email="[email protected]">BlackStartx</vendor>
<version>2022.3</version>
<version>2023.1</version>

<description><![CDATA[
A PyCharm Plugin that simplify the development of Blender Add-On inside the PyCharm IDE.
Expand Down
Binary file removed src/main/resources/icons/addon_folder.png
Binary file not shown.
6 changes: 6 additions & 0 deletions src/main/resources/icons/addon_folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/icons/addon_src_folder.png
Binary file not shown.
6 changes: 6 additions & 0 deletions src/main/resources/icons/addon_src_folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/icons/blender_logo.png
Binary file not shown.
7 changes: 7 additions & 0 deletions src/main/resources/icons/blender_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/resources/icons/blender_logo_gray.png
Binary file not shown.
6 changes: 6 additions & 0 deletions src/main/resources/icons/blender_logo_gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions update-urls/community-edition/updatePlugins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<!-- Community Edition - Self Update URL -->

<plugins>
<plugin id="org.blackstartx.blend-charm" version="2022.3"
url="https://github.com/BlackStartx/PyCharm-Blender-Plugin/releases/download/v2022.3/Blend-Charm.2022.3.Community.Edition.zip">
<plugin id="org.blackstartx.blend-charm" version="2023.1"
url="https://github.com/BlackStartx/PyCharm-Blender-Plugin/releases/download/v2023.1/Blend-Charm.2023.1.Community.Edition.zip">
<vendor email="[email protected]" url="">BlackStartx</vendor>
<name>Blend-Charm</name>
<description>
Expand Down
4 changes: 2 additions & 2 deletions update-urls/professional-edition/updatePlugins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<!-- Professional Edition - Self Update URL -->

<plugins>
<plugin id="org.blackstartx.blend-charm" version="2022.3"
url="https://github.com/BlackStartx/PyCharm-Blender-Plugin/releases/download/v2022.3/Blend-Charm.2022.3.Professional.Edition.zip">
<plugin id="org.blackstartx.blend-charm" version="2023.1"
url="https://github.com/BlackStartx/PyCharm-Blender-Plugin/releases/download/v2023.1/Blend-Charm.2023.1.Professional.Edition.zip">
<vendor email="[email protected]" url="">BlackStartx</vendor>
<name>Blend-Charm</name>
<description>
Expand Down

0 comments on commit d952fcd

Please sign in to comment.