Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
Nope. I still don't see it. No kind of context-menu shows or is possible anywhere, like the other thread shows.
Learn the Secrets of Poser 11 and Line-art Filters.
If you are still having problems pasting code. There is a handy tool here...
Go to that page and paste your code in the left window, at the top right of the page... select Preview As > markdown.
On the resulting page - copy the text and paste it in here.
Locked Out
No, I just tried it with some code on another thread. Copy from Visual Studio Code, right-click, paste as plain text. Doesn't work. It just pastes as.... plain text. Is the ability to paste a proper code-block gone forever?
Learn the Secrets of Poser 11 and Line-art Filters.
I just tried a straight copy and paste and it worked fine
def image_viewer( self ):
dialog = imagebrowser.ImageDialog( parent )
if dialog.ShowModal() == wx.ID_OK:
print( "You Selected File: " + dialog.GetFile() )
could be that are some hidden codes in VS that are stripped by the new editor
Locked Out
Copy and pasting from a proper code editor now works, but not from Notepad++. Examples:
# Copy and Paste from Notepad++ with Language : Python set and colour-coding on. Indenting correct but colors lost and spacing off.
if figure:
head_parts = figure.Actor("Head").Children()
for target in head_parts:
targetname = target.InternalName()
if "Brow" not in targetname and ("Eye" in targetname or "eye" in targetname) :
[then do something]
Type something under where the code is to go, before pasting in the code (such as this line). Or else you will not be able to add a new normal blank line, and then type normally beneath the code block (as I'm doing now).
Learn the Secrets of Poser 11 and Line-art Filters.
12 May 2022 having the same problem. It appears to be due to EOL character(s)
Cut code from Notepad++, screenshot below:
In the Renderosity forum post edit box Right-click > Paste as plain text...
...and here's what I get...
# Comment line 1
# Comment line 2
# Comment line 3
# Comment line 4
# Comment line 5
Just in case it's relevant I'm use Microsoft Edge
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
Using Notepad++, cut:
Using Vivaldi, right-click > Paste as plain text:
# Comment 1
# Comment 2
# Comment 3
# Comment 4
# Comment 5
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
So Notepad++ is the one thing that me and HartyBart have in common, and he's already said that "Copy and pasting from a proper code editor now works, but not from Notepad++"
I don't use proper code editors. ;)
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
It appears to be the Renderosity forum software rather than Notepad++ that's at fault
DAZ forum handles cut-and-paste from Notepad++ fine - end of this post
Hivewire3D forum handles cut-and-paste from Notepad++ fine - this post
I haven't tried any others yet.
Renderosity forum ?
# EOL = CR-LF
# comment 1
# comment 2
# comment 3
# comment 4
# comment 5
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
I suppose there's no chance of you allowing us to attach text files to posts in this forum, like most other forums do, to get round this ?
;)
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
Look at the top of the page. It says:
You can now attach text files to your posts to pass around scripts. Just
attach the script as a txt file like you would a jpg or gif. Since the
forum will use a random name for the file in the link, you should give
instructions on what the file name should be and where to install it.
Its a good idea to usually put that info right in the script file as
well.
So it does !
I'll give that a try - there should be a text file attached to this post (although there's nothing in or around the edit box to indicate that the text file was successfully added)
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
Well that didn't work. I must have done something wrong. This is what I did.
Click the little 'Picture' icon above the edit box - an Insert Image box appears.
Click the 'Choose Files' button, select 'All files (*.*) from the drop down bottom right of the 'Open' dialog so text files show up, scroll down and select my text file, click 'Open'...
The 'Open' dialog and 'Insert Image' box simply vanish
(I did mention that I'm a professional idiot tester, didn't I ? If it's possible to do something wrong by following the instructions I'll do it...)
(I'm using Edge)
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
(note the edit box always skips a line too just with a normal enter keypress)
--------------------------------------------------
from Notepad++
cancelled = False
# test if command is valid
# if so run the script
if command:
--------------------------------------------------
pasted fromN++ in edge
cancelled = False
# test if command is valid
# if so run the script
if command:
--------------------------------------------------
from vscode :
--------------------------------------------------
Locked Out
Typing text into edit box, line terminated by pressing the Enter key
More text, line terminated by pressing Shift-Enter
More text
The results of this test are exactly the same on the DAZ forum (i.e. Enter adds a blank line, Shift-Enter doesn't)
On the Hivewire3D forum neither Enter nor Shift-Enter add that spurious blank line.
If I cut-and-paste from any of the 3 forums (Renderosity, DAZ or Hivewire) and paste to Notepad++ the EOL character is the CR-LF pair because I'm using Windows
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
undefined posted at 5:30 AM Fri, 1 October 2021 - #2965901
Same here (Edge) - it was middle button of the middle group (6th from left, 5th from right) that I used to try and attach a text file
This is all I see, with or without browser extensions running.
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
This is all I see, with or without browser extensions running.
Learn the Secrets of Poser 11 and Line-art Filters.